package com.heima.wemedia.feign;

import com.heima.apis.wemedia.IWemediaClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.wemedia.service.WmChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/feign")
public class WemediaClient implements IWemediaClient {
    @Autowired
    WmChannelService wmChannelService;
    @GetMapping("/api/v1/channel")
    public ResponseResult getAllChannel() {
        return ResponseResult.okResult(wmChannelService.list());
    }
}
